package personal.lijun.skeleton.web.service;

import personal.lijun.skeleton.web.feign.CalendarUser;

/**
 * @Auther: lijun@sstcsoft.com
 * @Date: 2019/9/16 15:03
 */
public interface UserContext {
    /**
     * Gets the currently logged in {@link CalendarUser} or null if there is no authenticated user.
     *
     * @return
     */
    CalendarUser getCurrentUser();

    /**
     * Sets the currently logged in {@link CalendarUser}.
     * @param user the logged in {@link CalendarUser}. Cannot be null.
     * @throws IllegalArgumentException if the {@link CalendarUser} is null.
     */
    void setCurrentUser(CalendarUser user);
}
